<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Math::BigFloat - Arbitrary size floating point math package - Perldoc Browser</title>
    <link rel="search" href="https://perldoc.perl.org/opensearch.xml" type="application/opensearchdescription+xml" title="Perldoc Browser">
    <link rel="canonical" href="https://perldoc.perl.org/Math::BigFloat">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/stackoverflow-light.min.css" integrity="sha512-cG1IdFxqipi3gqLmksLtuk13C+hBa57a6zpWxMeoY3Q9O6ooFxq50DayCdm0QrDgZjMUn23z/0PMZlgft7Yp5Q==" crossorigin="anonymous" />
    <style>
      body {
        background: #f4f4f5;
        color: #020202;
      }
      .navbar-dark {
        background-image: -webkit-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: -o-linear-gradient(top, #005f85 0, #002e49 100%);
        background-image: linear-gradient(to bottom, #005f85 0, #002e49 100%);
        filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff005f85', endColorstr='#ff002e49', GradientType=0);
        background-repeat: repeat-x;
      }
      .navbar-dark .navbar-nav .nav-link,
      .navbar-dark .navbar-nav .nav-link:focus { color: #fff }
      .navbar-dark .navbar-nav .nav-link:hover { color: #ffef68 }
      #wrapperlicious {
        margin: 0 auto;
        font: 0.9em 'Helvetica Neue', Helvetica, sans-serif;
        font-weight: normal;
        line-height: 1.5em;
        margin: 0;
        padding: 0;
      }
      #wrapperlicious h1 { font-size: 1.5em }
      #wrapperlicious h2 { font-size: 1.3em }
      #wrapperlicious h3 { font-size: 1.1em }
      #wrapperlicious h4 { font-size: 0.9em }
      #wrapperlicious h1, #wrapperlicious h2, #wrapperlicious h3,
      #wrapperlicious h4, #wrapperlicious dt {
        color: #020202;
        margin-top: 1em;
        margin-bottom: 1em;
        position: relative;
        font-weight: bold;
      }
      #wrapperlicious a { color: inherit; text-decoration: underline }
      #wrapperlicious #toc { text-decoration: none }
      #wrapperlicious a:hover { color: #2a2a2a }
      #wrapperlicious a img { border: 0 }
      #wrapperlicious :not(pre) > code {
        color: inherit;
        background-color: rgba(0, 0, 0, 0.04);
        border-radius: 3px;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        padding: 0.3em;
      }
      #wrapperlicious dd {
        margin: 0;
        margin-left: 2em;
      }
      #wrapperlicious dt {
        color: #2a2a2a;
        font-weight: bold;
        margin-left: 0.9em;
      }
      #wrapperlicious p {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious li > p {
        margin-bottom: 0;
        margin-top: 0;
      }
      #wrapperlicious pre {
        border: 1px solid #c1c1c1;
        border-radius: 3px;
        font: 100% Consolas, Menlo, Monaco, monospace;
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious pre > code {
        display: block;
        background-color: #f6f6f6;
        font: 0.9em Consolas, Menlo, Monaco, monospace;
        line-height: 1.5em;
        text-align: left;
        white-space: pre;
        padding: 1em;
      }
      #wrapperlicious dl, #wrapperlicious ol, #wrapperlicious ul {
        margin-bottom: 1em;
        margin-top: 1em;
      }
      #wrapperlicious ul {
        list-style-type: square;
      }
      #wrapperlicious ul ul {
        margin-bottom: 0px;
        margin-top: 0px;
      }
      #footer {
        font-size: 0.8em;
        padding-top: 0.5em;
        text-align: center;
      }
      #more {
        display: inline;
        font-size: 0.8em;
      }
      #perldocdiv {
        background-color: #fff;
        border: 1px solid #c1c1c1;
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        margin-left: auto;
        margin-right: auto;
        padding: 3em;
        padding-top: 1em;
        max-width: 960px;
      }
      #moduleversion { float: right }
      #wrapperlicious .leading-notice {
        font-style: italic;
        padding-left: 1em;
        margin-top: 1em;
        margin-bottom: 1em;
      }
      #wrapperlicious .permalink {
        display: none;
        left: -0.75em;
        position: absolute;
        padding-right: 0.25em;
        text-decoration: none;
      }
      #wrapperlicious h1:hover .permalink, #wrapperlicious h2:hover .permalink,
      #wrapperlicious h3:hover .permalink, #wrapperlicious h4:hover .permalink,
      #wrapperlicious dt:hover .permalink {
        display: block;
      }
    </style>
    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-KVNWBNT5FB"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

      gtag('config', 'G-KVNWBNT5FB');
      gtag('config', 'UA-50555-3');
    </script>
  </head>
  <body>
    <nav class="navbar navbar-expand-md navbar-dark bg-dark justify-content-between">
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <a class="navbar-brand" href="https://perldoc.perl.org/">Perldoc Browser</a>
  <div class="collapse navbar-collapse" id="navbarNav">
    <ul class="navbar-nav mr-auto">
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./Math::BigFloat.html#" id="dropdownlink-stable" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">5.35.0</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-stable">
          <a class="dropdown-item" href="https://perldoc.perl.org/Math::BigFloat">Latest</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.2/Math::BigFloat">5.38.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.1/Math::BigFloat">5.38.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0/Math::BigFloat">5.38.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.3/Math::BigFloat">5.36.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.2/Math::BigFloat">5.36.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.1/Math::BigFloat">5.36.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.36.0/Math::BigFloat">5.36.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.3/Math::BigFloat">5.34.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.2/Math::BigFloat">5.34.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.1/Math::BigFloat">5.34.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.34.0/Math::BigFloat">5.34.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.1/Math::BigFloat">5.32.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.32.0/Math::BigFloat">5.32.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.3/Math::BigFloat">5.30.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.2/Math::BigFloat">5.30.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.1/Math::BigFloat">5.30.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.30.0/Math::BigFloat">5.30.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.3/Math::BigFloat">5.28.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.2/Math::BigFloat">5.28.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.1/Math::BigFloat">5.28.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.28.0/Math::BigFloat">5.28.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.3/Math::BigFloat">5.26.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.2/Math::BigFloat">5.26.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.1/Math::BigFloat">5.26.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.26.0/Math::BigFloat">5.26.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.4/Math::BigFloat">5.24.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.3/Math::BigFloat">5.24.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.2/Math::BigFloat">5.24.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.1/Math::BigFloat">5.24.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.24.0/Math::BigFloat">5.24.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.4/Math::BigFloat">5.22.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.3/Math::BigFloat">5.22.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.2/Math::BigFloat">5.22.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.1/Math::BigFloat">5.22.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.22.0/Math::BigFloat">5.22.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.3/Math::BigFloat">5.20.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.2/Math::BigFloat">5.20.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.1/Math::BigFloat">5.20.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.20.0/Math::BigFloat">5.20.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.4/Math::BigFloat">5.18.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.3/Math::BigFloat">5.18.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.2/Math::BigFloat">5.18.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.1/Math::BigFloat">5.18.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.18.0/Math::BigFloat">5.18.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.3/Math::BigFloat">5.16.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.2/Math::BigFloat">5.16.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.1/Math::BigFloat">5.16.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.16.0/Math::BigFloat">5.16.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.4/Math::BigFloat">5.14.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.3/Math::BigFloat">5.14.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.2/Math::BigFloat">5.14.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.1/Math::BigFloat">5.14.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.14.0/Math::BigFloat">5.14.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.5/Math::BigFloat">5.12.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.4/Math::BigFloat">5.12.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.3/Math::BigFloat">5.12.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.2/Math::BigFloat">5.12.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.1/Math::BigFloat">5.12.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.12.0/Math::BigFloat">5.12.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.1/Math::BigFloat">5.10.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.10.0/Math::BigFloat">5.10.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.9/Math::BigFloat">5.8.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.8/Math::BigFloat">5.8.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.7/Math::BigFloat">5.8.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.6/Math::BigFloat">5.8.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.5/Math::BigFloat">5.8.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.4/Math::BigFloat">5.8.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.3/Math::BigFloat">5.8.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.2/Math::BigFloat">5.8.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.1/Math::BigFloat">5.8.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.8.0/Math::BigFloat">5.8.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.2/Math::BigFloat">5.6.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.1/Math::BigFloat">5.6.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.6.0/Math::BigFloat">5.6.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_04/Math::BigFloat">5.005_04</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_03/Math::BigFloat">5.005_03</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_02/Math::BigFloat">5.005_02</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005_01/Math::BigFloat">5.005_01</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.005/Math::BigFloat">5.005</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./Math::BigFloat.html#" id="dropdownlink-dev" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dev</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-dev">
          <a class="dropdown-item" href="https://perldoc.perl.org/blead/Math::BigFloat">blead</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.6/Math::BigFloat">5.39.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.5/Math::BigFloat">5.39.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.4/Math::BigFloat">5.39.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.3/Math::BigFloat">5.39.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.2/Math::BigFloat">5.39.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.39.1/Math::BigFloat">5.39.1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC2/Math::BigFloat">5.38.0-RC2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.38.0-RC1/Math::BigFloat">5.38.0-RC1</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.11/Math::BigFloat">5.37.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.10/Math::BigFloat">5.37.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.9/Math::BigFloat">5.37.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.8/Math::BigFloat">5.37.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.7/Math::BigFloat">5.37.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.6/Math::BigFloat">5.37.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.5/Math::BigFloat">5.37.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.4/Math::BigFloat">5.37.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.3/Math::BigFloat">5.37.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.2/Math::BigFloat">5.37.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.1/Math::BigFloat">5.37.1</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.37.0/Math::BigFloat">5.37.0</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.11/Math::BigFloat">5.35.11</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.10/Math::BigFloat">5.35.10</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.9/Math::BigFloat">5.35.9</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.8/Math::BigFloat">5.35.8</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.7/Math::BigFloat">5.35.7</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.6/Math::BigFloat">5.35.6</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.5/Math::BigFloat">5.35.5</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.4/Math::BigFloat">5.35.4</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.3/Math::BigFloat">5.35.3</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.2/Math::BigFloat">5.35.2</a>
          <a class="dropdown-item" href="https://perldoc.perl.org/5.35.1/Math::BigFloat">5.35.1</a>
          <a class="dropdown-item active" href="./Math::BigFloat.html">5.35.0</a>
        </div>
      </li>
      <li class="nav-item dropdown text-nowrap">
        <a class="nav-link dropdown-toggle" href="./Math::BigFloat.html#" id="dropdownlink-nav" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Documentation</a>
        <div class="dropdown-menu" aria-labelledby="dropdownlink-nav">
          <a class="dropdown-item" href="perl.html">Perl</a>
          <a class="dropdown-item" href="perlintro.html">Intro</a>
          <a class="dropdown-item" href="perl.html#Tutorials">Tutorials</a>
          <a class="dropdown-item" href="perlfaq.html">FAQs</a>
          <a class="dropdown-item" href="perl.html#Reference-Manual">Reference</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlop.html">Operators</a>
          <a class="dropdown-item" href="functions.html">Functions</a>
          <a class="dropdown-item" href="variables.html">Variables</a>
          <a class="dropdown-item" href="modules.html">Modules</a>
          <a class="dropdown-item" href="perlutil.html">Utilities</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="perlcommunity.html">Community</a>
          <a class="dropdown-item" href="perlhist.html">History</a>
        </div>
      </li>
    </ul>
    <ul class="navbar-nav">
      <script>
        function set_expand (expand) {
          var perldocdiv = document.getElementById('perldocdiv');
          var width = window.getComputedStyle(perldocdiv).getPropertyValue('max-width');
          var expanded = (width == '' || width == 'none') ? true : false;
          if (expand === null) {
            expand = !expanded;
          }
          if ((expand && !expanded) || (!expand && expanded)) {
            perldocdiv.style.setProperty('max-width', expand ? 'none' : '960px');
            var button_classlist = document.getElementById('content-expand-button').classList;
            if (expand) {
              button_classlist.add('btn-light');
              button_classlist.remove('btn-outline-light');
            } else {
              button_classlist.add('btn-outline-light');
              button_classlist.remove('btn-light');
            }
          }
          return expand;
        }
        function toggle_expand () {
          var expand = set_expand(null);
          document.cookie = 'perldoc_expand=' + (expand ? 1 : 0) + '; path=/; expires=Tue, 19 Jan 2038 03:14:07 UTC';
        }
        function read_expand () {
          return document.cookie.split(';').some(function (item) { return item.indexOf('perldoc_expand=1') >= 0 });
        }
        if (document.readyState === 'loading') {
          document.addEventListener('DOMContentLoaded', function () {
            if (read_expand()) {
              set_expand(true);
            }
          });
        } else if (read_expand()) {
          set_expand(true);
        }
      </script>
      <button id="content-expand-button" type="button" class="btn btn-outline-light d-none d-lg-inline-block mr-2" onclick="toggle_expand()">Expand</button>
    <ul>
    <form class="form-inline" method="get" action="https://perldoc.perl.org/5.35.0/search">
      <input class="form-control mr-3" type="search" name="q" placeholder="Search" aria-label="Search">
    </form>
  </div>
</nav>

    <div id="wrapperlicious" class="container-fluid">
      <div id="perldocdiv">
        <div id="links">
          <a href="./Math::BigFloat.html">Math::BigFloat</a>
          <div id="more">
            (<a href="./Math::BigFloat.txt">source</a>,
            <a href="https://metacpan.org/pod/Math::BigFloat">CPAN</a>)
          </div>
            <div id="moduleversion">version 1.999818</div>
        </div>
        <div class="leading-notice">
          You are viewing the version of this documentation from Perl 5.35.0.
            This is a development version of Perl.
        </div>
        <h1><a id="toc">CONTENTS</a></h1>
                  <ul>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#NAME">NAME</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#SYNOPSIS">SYNOPSIS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#DESCRIPTION">DESCRIPTION</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#Input">Input</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#Output">Output</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#METHODS">METHODS</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#Configuration-methods">Configuration methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#Constructor-methods">Constructor methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#Arithmetic-methods">Arithmetic methods</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#ACCURACY-AND-PRECISION">ACCURACY AND PRECISION</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#Rounding">Rounding</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#Autocreating-constants">Autocreating constants</a>
                            <ul>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#Math-library">Math library</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#Using-Math::BigInt::Lite">Using Math::BigInt::Lite</a>
              </li>
          </ul>

              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#EXPORTS">EXPORTS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#CAVEATS">CAVEATS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#BUGS">BUGS</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#SUPPORT">SUPPORT</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#LICENSE">LICENSE</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#SEE-ALSO">SEE ALSO</a>
              </li>
              <li>
                <a class="text-decoration-none" href="./Math::BigFloat.html#AUTHORS">AUTHORS</a>
              </li>
          </ul>

      <h1 id="NAME"><a class="permalink" href="./Math::BigFloat.html#NAME">#</a>NAME</h1>

<p>Math::BigFloat - Arbitrary size floating point math package</p>

<h1 id="SYNOPSIS"><a class="permalink" href="./Math::BigFloat.html#SYNOPSIS">#</a>SYNOPSIS</h1>

<pre><code class="nohighlight">use Math::BigFloat;

# Configuration methods (may be used as class methods and instance methods)

Math::BigFloat-&gt;accuracy();     # get class accuracy
Math::BigFloat-&gt;accuracy($n);   # set class accuracy
Math::BigFloat-&gt;precision();    # get class precision
Math::BigFloat-&gt;precision($n);  # set class precision
Math::BigFloat-&gt;round_mode();   # get class rounding mode
Math::BigFloat-&gt;round_mode($m); # set global round mode, must be one of
                                # &#39;even&#39;, &#39;odd&#39;, &#39;+inf&#39;, &#39;-inf&#39;, &#39;zero&#39;,
                                # &#39;trunc&#39;, or &#39;common&#39;
Math::BigFloat-&gt;config(&quot;lib&quot;);  # name of backend math library

# Constructor methods (when the class methods below are used as instance
# methods, the value is assigned the invocand)

$x = Math::BigFloat-&gt;new($str);               # defaults to 0
$x = Math::BigFloat-&gt;new(&#39;0x123&#39;);            # from hexadecimal
$x = Math::BigFloat-&gt;new(&#39;0b101&#39;);            # from binary
$x = Math::BigFloat-&gt;from_hex(&#39;0xc.afep+3&#39;);  # from hex
$x = Math::BigFloat-&gt;from_hex(&#39;cafe&#39;);        # ditto
$x = Math::BigFloat-&gt;from_oct(&#39;1.3267p-4&#39;);   # from octal
$x = Math::BigFloat-&gt;from_oct(&#39;0377&#39;);        # ditto
$x = Math::BigFloat-&gt;from_bin(&#39;0b1.1001p-4&#39;); # from binary
$x = Math::BigFloat-&gt;from_bin(&#39;0101&#39;);        # ditto
$x = Math::BigFloat-&gt;from_ieee754($b, &quot;binary64&quot;);  # from IEEE-754 bytes
$x = Math::BigFloat-&gt;bzero();                 # create a +0
$x = Math::BigFloat-&gt;bone();                  # create a +1
$x = Math::BigFloat-&gt;bone(&#39;-&#39;);               # create a -1
$x = Math::BigFloat-&gt;binf();                  # create a +inf
$x = Math::BigFloat-&gt;binf(&#39;-&#39;);               # create a -inf
$x = Math::BigFloat-&gt;bnan();                  # create a Not-A-Number
$x = Math::BigFloat-&gt;bpi();                   # returns pi

$y = $x-&gt;copy();        # make a copy (unlike $y = $x)
$y = $x-&gt;as_int();      # return as BigInt

# Boolean methods (these don&#39;t modify the invocand)

$x-&gt;is_zero();          # if $x is 0
$x-&gt;is_one();           # if $x is +1
$x-&gt;is_one(&quot;+&quot;);        # ditto
$x-&gt;is_one(&quot;-&quot;);        # if $x is -1
$x-&gt;is_inf();           # if $x is +inf or -inf
$x-&gt;is_inf(&quot;+&quot;);        # if $x is +inf
$x-&gt;is_inf(&quot;-&quot;);        # if $x is -inf
$x-&gt;is_nan();           # if $x is NaN

$x-&gt;is_positive();      # if $x &gt; 0
$x-&gt;is_pos();           # ditto
$x-&gt;is_negative();      # if $x &lt; 0
$x-&gt;is_neg();           # ditto

$x-&gt;is_odd();           # if $x is odd
$x-&gt;is_even();          # if $x is even
$x-&gt;is_int();           # if $x is an integer

# Comparison methods

$x-&gt;bcmp($y);           # compare numbers (undef, &lt; 0, == 0, &gt; 0)
$x-&gt;bacmp($y);          # compare absolutely (undef, &lt; 0, == 0, &gt; 0)
$x-&gt;beq($y);            # true if and only if $x == $y
$x-&gt;bne($y);            # true if and only if $x != $y
$x-&gt;blt($y);            # true if and only if $x &lt; $y
$x-&gt;ble($y);            # true if and only if $x &lt;= $y
$x-&gt;bgt($y);            # true if and only if $x &gt; $y
$x-&gt;bge($y);            # true if and only if $x &gt;= $y

# Arithmetic methods

$x-&gt;bneg();             # negation
$x-&gt;babs();             # absolute value
$x-&gt;bsgn();             # sign function (-1, 0, 1, or NaN)
$x-&gt;bnorm();            # normalize (no-op)
$x-&gt;binc();             # increment $x by 1
$x-&gt;bdec();             # decrement $x by 1
$x-&gt;badd($y);           # addition (add $y to $x)
$x-&gt;bsub($y);           # subtraction (subtract $y from $x)
$x-&gt;bmul($y);           # multiplication (multiply $x by $y)
$x-&gt;bmuladd($y,$z);     # $x = $x * $y + $z
$x-&gt;bdiv($y);           # division (floored), set $x to quotient
                        # return (quo,rem) or quo if scalar
$x-&gt;btdiv($y);          # division (truncated), set $x to quotient
                        # return (quo,rem) or quo if scalar
$x-&gt;bmod($y);           # modulus (x % y)
$x-&gt;btmod($y);          # modulus (truncated)
$x-&gt;bmodinv($mod);      # modular multiplicative inverse
$x-&gt;bmodpow($y,$mod);   # modular exponentiation (($x ** $y) % $mod)
$x-&gt;bpow($y);           # power of arguments (x ** y)
$x-&gt;blog();             # logarithm of $x to base e (Euler&#39;s number)
$x-&gt;blog($base);        # logarithm of $x to base $base (e.g., base 2)
$x-&gt;bexp();             # calculate e ** $x where e is Euler&#39;s number
$x-&gt;bnok($y);           # x over y (binomial coefficient n over k)
$x-&gt;bsin();             # sine
$x-&gt;bcos();             # cosine
$x-&gt;batan();            # inverse tangent
$x-&gt;batan2($y);         # two-argument inverse tangent
$x-&gt;bsqrt();            # calculate square root
$x-&gt;broot($y);          # $y&#39;th root of $x (e.g. $y == 3 =&gt; cubic root)
$x-&gt;bfac();             # factorial of $x (1*2*3*4*..$x)

$x-&gt;blsft($n);          # left shift $n places in base 2
$x-&gt;blsft($n,$b);       # left shift $n places in base $b
                        # returns (quo,rem) or quo (scalar context)
$x-&gt;brsft($n);          # right shift $n places in base 2
$x-&gt;brsft($n,$b);       # right shift $n places in base $b
                        # returns (quo,rem) or quo (scalar context)

# Bitwise methods

$x-&gt;band($y);           # bitwise and
$x-&gt;bior($y);           # bitwise inclusive or
$x-&gt;bxor($y);           # bitwise exclusive or
$x-&gt;bnot();             # bitwise not (two&#39;s complement)

# Rounding methods
$x-&gt;round($A,$P,$mode); # round to accuracy or precision using
                        # rounding mode $mode
$x-&gt;bround($n);         # accuracy: preserve $n digits
$x-&gt;bfround($n);        # $n &gt; 0: round to $nth digit left of dec. point
                        # $n &lt; 0: round to $nth digit right of dec. point
$x-&gt;bfloor();           # round towards minus infinity
$x-&gt;bceil();            # round towards plus infinity
$x-&gt;bint();             # round towards zero

# Other mathematical methods

$x-&gt;bgcd($y);            # greatest common divisor
$x-&gt;blcm($y);            # least common multiple

# Object property methods (do not modify the invocand)

$x-&gt;sign();              # the sign, either +, - or NaN
$x-&gt;digit($n);           # the nth digit, counting from the right
$x-&gt;digit(-$n);          # the nth digit, counting from the left
$x-&gt;length();            # return number of digits in number
($xl,$f) = $x-&gt;length(); # length of number and length of fraction
                         # part, latter is always 0 digits long
                         # for Math::BigInt objects
$x-&gt;mantissa();          # return (signed) mantissa as BigInt
$x-&gt;exponent();          # return exponent as BigInt
$x-&gt;parts();             # return (mantissa,exponent) as BigInt
$x-&gt;sparts();            # mantissa and exponent (as integers)
$x-&gt;nparts();            # mantissa and exponent (normalised)
$x-&gt;eparts();            # mantissa and exponent (engineering notation)
$x-&gt;dparts();            # integer and fraction part

# Conversion methods (do not modify the invocand)

$x-&gt;bstr();         # decimal notation, possibly zero padded
$x-&gt;bsstr();        # string in scientific notation with integers
$x-&gt;bnstr();        # string in normalized notation
$x-&gt;bestr();        # string in engineering notation
$x-&gt;bdstr();        # string in decimal notation
$x-&gt;as_hex();       # as signed hexadecimal string with prefixed 0x
$x-&gt;as_bin();       # as signed binary string with prefixed 0b
$x-&gt;as_oct();       # as signed octal string with prefixed 0
$x-&gt;to_ieee754($format); # to bytes encoded according to IEEE 754-2008

# Other conversion methods

$x-&gt;numify();           # return as scalar (might overflow or underflow)</code></pre>

<h1 id="DESCRIPTION"><a class="permalink" href="./Math::BigFloat.html#DESCRIPTION">#</a>DESCRIPTION</h1>

<p>Math::BigFloat provides support for arbitrary precision floating point. Overloading is also provided for Perl operators.</p>

<p>All operators (including basic math operations) are overloaded if you declare your big floating point numbers as</p>

<pre><code>$x = Math::BigFloat -&gt; new(&#39;12_3.456_789_123_456_789E-2&#39;);</code></pre>

<p>Operations with overloaded operators preserve the arguments, which is exactly what you expect.</p>

<h2 id="Input"><a class="permalink" href="./Math::BigFloat.html#Input">#</a>Input</h2>

<p>Input values to these routines may be any scalar number or string that looks like a number and represents a floating point number.</p>

<ul>

<li><p>Leading and trailing whitespace is ignored.</p>

</li>
<li><p>Leading and trailing zeros are ignored.</p>

</li>
<li><p>If the string has a &quot;0x&quot; prefix, it is interpreted as a hexadecimal number.</p>

</li>
<li><p>If the string has a &quot;0b&quot; prefix, it is interpreted as a binary number.</p>

</li>
<li><p>For hexadecimal and binary numbers, the exponent must be separated from the significand (mantissa) by the letter &quot;p&quot; or &quot;P&quot;, not &quot;e&quot; or &quot;E&quot; as with decimal numbers.</p>

</li>
<li><p>One underline is allowed between any two digits, including hexadecimal and binary digits.</p>

</li>
<li><p>If the string can not be interpreted, NaN is returned.</p>

</li>
</ul>

<p>Octal numbers are typically prefixed by &quot;0&quot;, but since leading zeros are stripped, these methods can not automatically recognize octal numbers, so use the constructor from_oct() to interpret octal strings.</p>

<p>Some examples of valid string input</p>

<pre><code class="plaintext">Input string                Resulting value
123                         123
1.23e2                      123
12300e-2                    123
0xcafe                      51966
0b1101                      13
67_538_754                  67538754
-4_5_6.7_8_9e+0_1_0         -4567890000000
0x1.921fb5p+1               3.14159262180328369140625e+0
0b1.1001p-4                 9.765625e-2</code></pre>

<h2 id="Output"><a class="permalink" href="./Math::BigFloat.html#Output">#</a>Output</h2>

<p>Output values are usually Math::BigFloat objects.</p>

<p>Boolean operators <code>is_zero()</code>, <code>is_one()</code>, <code>is_inf()</code>, etc. return true or false.</p>

<p>Comparison operators <code>bcmp()</code> and <code>bacmp()</code>) return -1, 0, 1, or undef.</p>

<h1 id="METHODS"><a class="permalink" href="./Math::BigFloat.html#METHODS">#</a>METHODS</h1>

<p>Math::BigFloat supports all methods that Math::BigInt supports, except it calculates non-integer results when possible. Please see <a href="./Math::BigInt.html">Math::BigInt</a> for a full description of each method. Below are just the most important differences:</p>

<h2 id="Configuration-methods"><a class="permalink" href="./Math::BigFloat.html#Configuration-methods">#</a><a id="Configuration"></a>Configuration methods</h2>

<dl>

<dt id="accuracy()"><a class="permalink" href="./Math::BigFloat.html#accuracy()">#</a><a id="accuracy"></a>accuracy()</dt>
<dd>

<pre><code>$x-&gt;accuracy(5);           # local for $x
CLASS-&gt;accuracy(5);        # global for all members of CLASS
                           # Note: This also applies to new()!

$A = $x-&gt;accuracy();       # read out accuracy that affects $x
$A = CLASS-&gt;accuracy();    # read out global accuracy</code></pre>

<p>Set or get the global or local accuracy, aka how many significant digits the results have. If you set a global accuracy, then this also applies to new()!</p>

<p>Warning! The accuracy <i>sticks</i>, e.g. once you created a number under the influence of <code>CLASS-&gt;accuracy($A)</code>, all results from math operations with that number will also be rounded.</p>

<p>In most cases, you should probably round the results explicitly using one of <a href="./Math::BigInt.html#round%28%29">&quot;round()&quot; in Math::BigInt</a>, <a href="./Math::BigInt.html#bround%28%29">&quot;bround()&quot; in Math::BigInt</a> or <a href="./Math::BigInt.html#bfround%28%29">&quot;bfround()&quot; in Math::BigInt</a> or by passing the desired accuracy to the math operation as additional parameter:</p>

<pre><code>my $x = Math::BigInt-&gt;new(30000);
my $y = Math::BigInt-&gt;new(7);
print scalar $x-&gt;copy()-&gt;bdiv($y, 2);           # print 4300
print scalar $x-&gt;copy()-&gt;bdiv($y)-&gt;bround(2);   # print 4300</code></pre>

</dd>
<dt id="precision()"><a class="permalink" href="./Math::BigFloat.html#precision()">#</a><a id="precision"></a>precision()</dt>
<dd>

<pre><code>$x-&gt;precision(-2);        # local for $x, round at the second
                          # digit right of the dot
$x-&gt;precision(2);         # ditto, round at the second digit
                          # left of the dot

CLASS-&gt;precision(5);      # Global for all members of CLASS
                          # This also applies to new()!
CLASS-&gt;precision(-5);     # ditto

$P = CLASS-&gt;precision();  # read out global precision
$P = $x-&gt;precision();     # read out precision that affects $x</code></pre>

<p>Note: You probably want to use <a href="./Math::BigFloat.html#accuracy%28%29">&quot;accuracy()&quot;</a> instead. With <a href="./Math::BigFloat.html#accuracy%28%29">&quot;accuracy()&quot;</a> you set the number of digits each result should have, with <a href="./Math::BigFloat.html#precision%28%29">&quot;precision()&quot;</a> you set the place where to round!</p>

</dd>
</dl>

<h2 id="Constructor-methods"><a class="permalink" href="./Math::BigFloat.html#Constructor-methods">#</a><a id="Constructor"></a>Constructor methods</h2>

<dl>

<dt id="from_hex()"><a class="permalink" href="./Math::BigFloat.html#from_hex()">#</a><a id="from_hex"></a>from_hex()</dt>
<dd>

<pre><code>$x -&gt; from_hex(&quot;0x1.921fb54442d18p+1&quot;);
$x = Math::BigFloat -&gt; from_hex(&quot;0x1.921fb54442d18p+1&quot;);</code></pre>

<p>Interpret input as a hexadecimal string.A prefix (&quot;0x&quot;, &quot;x&quot;, ignoring case) is optional. A single underscore character (&quot;_&quot;) may be placed between any two digits. If the input is invalid, a NaN is returned. The exponent is in base 2 using decimal digits.</p>

<p>If called as an instance method, the value is assigned to the invocand.</p>

</dd>
<dt id="from_oct()"><a class="permalink" href="./Math::BigFloat.html#from_oct()">#</a><a id="from_oct"></a>from_oct()</dt>
<dd>

<pre><code>$x -&gt; from_oct(&quot;1.3267p-4&quot;);
$x = Math::BigFloat -&gt; from_oct(&quot;1.3267p-4&quot;);</code></pre>

<p>Interpret input as an octal string. A single underscore character (&quot;_&quot;) may be placed between any two digits. If the input is invalid, a NaN is returned. The exponent is in base 2 using decimal digits.</p>

<p>If called as an instance method, the value is assigned to the invocand.</p>

</dd>
<dt id="from_bin()"><a class="permalink" href="./Math::BigFloat.html#from_bin()">#</a><a id="from_bin"></a>from_bin()</dt>
<dd>

<pre><code>$x -&gt; from_bin(&quot;0b1.1001p-4&quot;);
$x = Math::BigFloat -&gt; from_bin(&quot;0b1.1001p-4&quot;);</code></pre>

<p>Interpret input as a hexadecimal string. A prefix (&quot;0b&quot; or &quot;b&quot;, ignoring case) is optional. A single underscore character (&quot;_&quot;) may be placed between any two digits. If the input is invalid, a NaN is returned. The exponent is in base 2 using decimal digits.</p>

<p>If called as an instance method, the value is assigned to the invocand.</p>

</dd>
<dt id="from_ieee754()"><a class="permalink" href="./Math::BigFloat.html#from_ieee754()">#</a><a id="from_ieee754"></a>from_ieee754()</dt>
<dd>

<p>Interpret the input as a value encoded as described in IEEE754-2008. The input can be given as a byte string, hex string or binary string. The input is assumed to be in big-endian byte-order.</p>

<pre><code># both $dbl and $mbf are 3.141592...
$bytes = &quot;\x40\x09\x21\xfb\x54\x44\x2d\x18&quot;;
$dbl = unpack &quot;d&gt;&quot;, $bytes;
$mbf = Math::BigFloat -&gt; from_ieee754($bytes, &quot;binary64&quot;);</code></pre>

</dd>
<dt id="bpi()"><a class="permalink" href="./Math::BigFloat.html#bpi()">#</a><a id="bpi"></a>bpi()</dt>
<dd>

<pre><code>print Math::BigFloat-&gt;bpi(100), &quot;\n&quot;;</code></pre>

<p>Calculate PI to N digits (including the 3 before the dot). The result is rounded according to the current rounding mode, which defaults to &quot;even&quot;.</p>

<p>This method was added in v1.87 of Math::BigInt (June 2007).</p>

</dd>
</dl>

<h2 id="Arithmetic-methods"><a class="permalink" href="./Math::BigFloat.html#Arithmetic-methods">#</a><a id="Arithmetic"></a>Arithmetic methods</h2>

<dl>

<dt id="bmuladd()"><a class="permalink" href="./Math::BigFloat.html#bmuladd()">#</a><a id="bmuladd"></a>bmuladd()</dt>
<dd>

<pre><code>$x-&gt;bmuladd($y,$z);</code></pre>

<p>Multiply $x by $y, and then add $z to the result.</p>

<p>This method was added in v1.87 of Math::BigInt (June 2007).</p>

</dd>
<dt id="bdiv()"><a class="permalink" href="./Math::BigFloat.html#bdiv()">#</a><a id="bdiv"></a>bdiv()</dt>
<dd>

<pre><code>$q = $x-&gt;bdiv($y);
($q, $r) = $x-&gt;bdiv($y);</code></pre>

<p>In scalar context, divides $x by $y and returns the result to the given or default accuracy/precision. In list context, does floored division (F-division), returning an integer $q and a remainder $r so that $x = $q * $y + $r. The remainer (modulo) is equal to what is returned by <code>$x-&gt;bmod($y)</code>.</p>

</dd>
<dt id="bmod()"><a class="permalink" href="./Math::BigFloat.html#bmod()">#</a><a id="bmod"></a>bmod()</dt>
<dd>

<pre><code>$x-&gt;bmod($y);</code></pre>

<p>Returns $x modulo $y. When $x is finite, and $y is finite and non-zero, the result is identical to the remainder after floored division (F-division). If, in addition, both $x and $y are integers, the result is identical to the result from Perl&#39;s % operator.</p>

</dd>
<dt id="bexp()"><a class="permalink" href="./Math::BigFloat.html#bexp()">#</a><a id="bexp"></a>bexp()</dt>
<dd>

<pre><code>$x-&gt;bexp($accuracy);            # calculate e ** X</code></pre>

<p>Calculates the expression <code>e ** $x</code> where <code>e</code> is Euler&#39;s number.</p>

<p>This method was added in v1.82 of Math::BigInt (April 2007).</p>

</dd>
<dt id="bnok()"><a class="permalink" href="./Math::BigFloat.html#bnok()">#</a><a id="bnok"></a>bnok()</dt>
<dd>

<pre><code>$x-&gt;bnok($y);   # x over y (binomial coefficient n over k)</code></pre>

<p>Calculates the binomial coefficient n over k, also called the &quot;choose&quot; function. The result is equivalent to:</p>

<pre><code class="plaintext">( n )      n!
| - |  = -------
( k )    k!(n-k)!</code></pre>

<p>This method was added in v1.84 of Math::BigInt (April 2007).</p>

</dd>
<dt id="bsin()"><a class="permalink" href="./Math::BigFloat.html#bsin()">#</a><a id="bsin"></a>bsin()</dt>
<dd>

<pre><code>my $x = Math::BigFloat-&gt;new(1);
print $x-&gt;bsin(100), &quot;\n&quot;;</code></pre>

<p>Calculate the sinus of $x, modifying $x in place.</p>

<p>This method was added in v1.87 of Math::BigInt (June 2007).</p>

</dd>
<dt id="bcos()"><a class="permalink" href="./Math::BigFloat.html#bcos()">#</a><a id="bcos"></a>bcos()</dt>
<dd>

<pre><code>my $x = Math::BigFloat-&gt;new(1);
print $x-&gt;bcos(100), &quot;\n&quot;;</code></pre>

<p>Calculate the cosinus of $x, modifying $x in place.</p>

<p>This method was added in v1.87 of Math::BigInt (June 2007).</p>

</dd>
<dt id="batan()"><a class="permalink" href="./Math::BigFloat.html#batan()">#</a><a id="batan"></a>batan()</dt>
<dd>

<pre><code>my $x = Math::BigFloat-&gt;new(1);
print $x-&gt;batan(100), &quot;\n&quot;;</code></pre>

<p>Calculate the arcus tanges of $x, modifying $x in place. See also <a href="./Math::BigFloat.html#batan2%28%29">&quot;batan2()&quot;</a>.</p>

<p>This method was added in v1.87 of Math::BigInt (June 2007).</p>

</dd>
<dt id="batan2()"><a class="permalink" href="./Math::BigFloat.html#batan2()">#</a><a id="batan2"></a>batan2()</dt>
<dd>

<pre><code>my $y = Math::BigFloat-&gt;new(2);
my $x = Math::BigFloat-&gt;new(3);
print $y-&gt;batan2($x), &quot;\n&quot;;</code></pre>

<p>Calculate the arcus tanges of <code>$y</code> divided by <code>$x</code>, modifying $y in place. See also <a href="./Math::BigFloat.html#batan%28%29">&quot;batan()&quot;</a>.</p>

<p>This method was added in v1.87 of Math::BigInt (June 2007).</p>

</dd>
<dt id="as_float()"><a class="permalink" href="./Math::BigFloat.html#as_float()">#</a><a id="as_float"></a>as_float()</dt>
<dd>

<p>This method is called when Math::BigFloat encounters an object it doesn&#39;t know how to handle. For instance, assume $x is a Math::BigFloat, or subclass thereof, and $y is defined, but not a Math::BigFloat, or subclass thereof. If you do</p>

<pre><code>$x -&gt; badd($y);</code></pre>

<p>$y needs to be converted into an object that $x can deal with. This is done by first checking if $y is something that $x might be upgraded to. If that is the case, no further attempts are made. The next is to see if $y supports the method <code>as_float()</code>. The method <code>as_float()</code> is expected to return either an object that has the same class as $x, a subclass thereof, or a string that <code>ref($x)-&gt;new()</code> can parse to create an object.</p>

<p>In Math::BigFloat, <code>as_float()</code> has the same effect as <code>copy()</code>.</p>

</dd>
<dt id="to_ieee754()"><a class="permalink" href="./Math::BigFloat.html#to_ieee754()">#</a><a id="to_ieee754"></a>to_ieee754()</dt>
<dd>

<p>Encodes the invocand as a byte string in the given format as specified in IEEE 754-2008. Note that the encoded value is the nearest possible representation of the value. This value might not be exactly the same as the value in the invocand.</p>

<pre><code># $x = 3.1415926535897932385
$x = Math::BigFloat -&gt; bpi(30);

$b = $x -&gt; to_ieee754(&quot;binary64&quot;);  # encode as 8 bytes
$h = unpack &quot;H*&quot;, $b;               # &quot;400921fb54442d18&quot;

# 3.141592653589793115997963...
$y = Math::BigFloat -&gt; from_ieee754($h, &quot;binary64&quot;);</code></pre>

<p>All binary formats in IEEE 754-2008 are accepted. For convenience, som aliases are recognized: &quot;half&quot; for &quot;binary16&quot;, &quot;single&quot; for &quot;binary32&quot;, &quot;double&quot; for &quot;binary64&quot;, &quot;quadruple&quot; for &quot;binary128&quot;, &quot;octuple&quot; for &quot;binary256&quot;, and &quot;sexdecuple&quot; for &quot;binary512&quot;.</p>

<p>See also <a href="https://en.wikipedia.org/wiki/IEEE_754">https://en.wikipedia.org/wiki/IEEE_754</a>.</p>

</dd>
</dl>

<h2 id="ACCURACY-AND-PRECISION"><a class="permalink" href="./Math::BigFloat.html#ACCURACY-AND-PRECISION">#</a><a id="ACCURACY"></a>ACCURACY AND PRECISION</h2>

<p>See also: <a href="./Math::BigFloat.html#Rounding">Rounding</a>.</p>

<p>Math::BigFloat supports both precision (rounding to a certain place before or after the dot) and accuracy (rounding to a certain number of digits). For a full documentation, examples and tips on these topics please see the large section about rounding in <a href="./Math::BigInt.html">Math::BigInt</a>.</p>

<p>Since things like <code>sqrt(2)</code> or <code>1 / 3</code> must presented with a limited accuracy lest a operation consumes all resources, each operation produces no more than the requested number of digits.</p>

<p>If there is no global precision or accuracy set, <b>and</b> the operation in question was not called with a requested precision or accuracy, <b>and</b> the input $x has no accuracy or precision set, then a fallback parameter will be used. For historical reasons, it is called <code>div_scale</code> and can be accessed via:</p>

<pre><code>$d = Math::BigFloat-&gt;div_scale();       # query
Math::BigFloat-&gt;div_scale($n);          # set to $n digits</code></pre>

<p>The default value for <code>div_scale</code> is 40.</p>

<p>In case the result of one operation has more digits than specified, it is rounded. The rounding mode taken is either the default mode, or the one supplied to the operation after the <i>scale</i>:</p>

<pre><code>$x = Math::BigFloat-&gt;new(2);
Math::BigFloat-&gt;accuracy(5);              # 5 digits max
$y = $x-&gt;copy()-&gt;bdiv(3);                 # gives 0.66667
$y = $x-&gt;copy()-&gt;bdiv(3,6);               # gives 0.666667
$y = $x-&gt;copy()-&gt;bdiv(3,6,undef,&#39;odd&#39;);   # gives 0.666667
Math::BigFloat-&gt;round_mode(&#39;zero&#39;);
$y = $x-&gt;copy()-&gt;bdiv(3,6);               # will also give 0.666667</code></pre>

<p>Note that <code>Math::BigFloat-&gt;accuracy()</code> and <code>Math::BigFloat-&gt;precision()</code> set the global variables, and thus <b>any</b> newly created number will be subject to the global rounding <b>immediately</b>. This means that in the examples above, the <code>3</code> as argument to <code>bdiv()</code> will also get an accuracy of <b>5</b>.</p>

<p>It is less confusing to either calculate the result fully, and afterwards round it explicitly, or use the additional parameters to the math functions like so:</p>

<pre><code>use Math::BigFloat;
$x = Math::BigFloat-&gt;new(2);
$y = $x-&gt;copy()-&gt;bdiv(3);
print $y-&gt;bround(5),&quot;\n&quot;;               # gives 0.66667

or

use Math::BigFloat;
$x = Math::BigFloat-&gt;new(2);
$y = $x-&gt;copy()-&gt;bdiv(3,5);             # gives 0.66667
print &quot;$y\n&quot;;</code></pre>

<h2 id="Rounding"><a class="permalink" href="./Math::BigFloat.html#Rounding">#</a>Rounding</h2>

<dl>

<dt id="bfround-(-+$scale-)"><a class="permalink" href="./Math::BigFloat.html#bfround-(-+$scale-)">#</a><a id="bfround"></a><a id="bfround-scale"></a>bfround ( +$scale )</dt>
<dd>

<p>Rounds to the $scale&#39;th place left from the &#39;.&#39;, counting from the dot. The first digit is numbered 1.</p>

</dd>
<dt id="bfround-(-$scale-)"><a class="permalink" href="./Math::BigFloat.html#bfround-(-$scale-)">#</a><a id="bfround1"></a><a id="bfround---scale"></a>bfround ( -$scale )</dt>
<dd>

<p>Rounds to the $scale&#39;th place right from the &#39;.&#39;, counting from the dot.</p>

</dd>
<dt id="bfround-(-0-)"><a class="permalink" href="./Math::BigFloat.html#bfround-(-0-)">#</a><a id="bfround2"></a><a id="bfround-0"></a>bfround ( 0 )</dt>
<dd>

<p>Rounds to an integer.</p>

</dd>
<dt id="bround-(-+$scale-)"><a class="permalink" href="./Math::BigFloat.html#bround-(-+$scale-)">#</a><a id="bround"></a><a id="bround-scale"></a>bround ( +$scale )</dt>
<dd>

<p>Preserves accuracy to $scale digits from the left (aka significant digits) and pads the rest with zeros. If the number is between 1 and -1, the significant digits count from the first non-zero after the &#39;.&#39;</p>

</dd>
<dt id="bround-(-$scale-)-and-bround-(-0-)"><a class="permalink" href="./Math::BigFloat.html#bround-(-$scale-)-and-bround-(-0-)">#</a><a id="bround1"></a><a id="bround---scale-and-bround-0"></a>bround ( -$scale ) and bround ( 0 )</dt>
<dd>

<p>These are effectively no-ops.</p>

</dd>
</dl>

<p>All rounding functions take as a second parameter a rounding mode from one of the following: &#39;even&#39;, &#39;odd&#39;, &#39;+inf&#39;, &#39;-inf&#39;, &#39;zero&#39;, &#39;trunc&#39; or &#39;common&#39;.</p>

<p>The default rounding mode is &#39;even&#39;. By using <code>Math::BigFloat-&gt;round_mode($round_mode);</code> you can get and set the default mode for subsequent rounding. The usage of <code>$Math::BigFloat::$round_mode</code> is no longer supported. The second parameter to the round functions then overrides the default temporarily.</p>

<p>The <code>as_number()</code> function returns a BigInt from a Math::BigFloat. It uses &#39;trunc&#39; as rounding mode to make it equivalent to:</p>

<pre><code>$x = 2.5;
$y = int($x) + 2;</code></pre>

<p>You can override this by passing the desired rounding mode as parameter to <code>as_number()</code>:</p>

<pre><code>$x = Math::BigFloat-&gt;new(2.5);
$y = $x-&gt;as_number(&#39;odd&#39;);      # $y = 3</code></pre>

<h1 id="Autocreating-constants"><a class="permalink" href="./Math::BigFloat.html#Autocreating-constants">#</a><a id="Autocreating"></a>Autocreating constants</h1>

<p>After <code>use Math::BigFloat &#39;:constant&#39;</code> all the floating point constants in the given scope are converted to <code>Math::BigFloat</code>. This conversion happens at compile time.</p>

<p>In particular</p>

<pre><code class="plaintext">perl -MMath::BigFloat=:constant -e &#39;print 2E-100,&quot;\n&quot;&#39;</code></pre>

<p>prints the value of <code>2E-100</code>. Note that without conversion of constants the expression 2E-100 will be calculated as normal floating point number.</p>

<p>Please note that &#39;:constant&#39; does not affect integer constants, nor binary nor hexadecimal constants. Use <a href="bignum.html">bignum</a> or <a href="./Math::BigInt.html">Math::BigInt</a> to get this to work.</p>

<h2 id="Math-library"><a class="permalink" href="./Math::BigFloat.html#Math-library">#</a><a id="Math"></a>Math library</h2>

<p>Math with the numbers is done (by default) by a module called Math::BigInt::Calc. This is equivalent to saying:</p>

<pre><code>use Math::BigFloat lib =&gt; &#39;Calc&#39;;</code></pre>

<p>You can change this by using:</p>

<pre><code>use Math::BigFloat lib =&gt; &#39;GMP&#39;;</code></pre>

<p><b>Note</b>: General purpose packages should not be explicit about the library to use; let the script author decide which is best.</p>

<p>Note: The keyword &#39;lib&#39; will warn when the requested library could not be loaded. To suppress the warning use &#39;try&#39; instead:</p>

<pre><code>use Math::BigFloat try =&gt; &#39;GMP&#39;;</code></pre>

<p>If your script works with huge numbers and Calc is too slow for them, you can also for the loading of one of these libraries and if none of them can be used, the code will die:</p>

<pre><code>use Math::BigFloat only =&gt; &#39;GMP,Pari&#39;;</code></pre>

<p>The following would first try to find Math::BigInt::Foo, then Math::BigInt::Bar, and when this also fails, revert to Math::BigInt::Calc:</p>

<pre><code>use Math::BigFloat lib =&gt; &#39;Foo,Math::BigInt::Bar&#39;;</code></pre>

<p>See the respective low-level library documentation for further details.</p>

<p>Please note that Math::BigFloat does <b>not</b> use the denoted library itself, but it merely passes the lib argument to Math::BigInt. So, instead of the need to do:</p>

<pre><code>use Math::BigInt lib =&gt; &#39;GMP&#39;;
use Math::BigFloat;</code></pre>

<p>you can roll it all into one line:</p>

<pre><code>use Math::BigFloat lib =&gt; &#39;GMP&#39;;</code></pre>

<p>It is also possible to just require Math::BigFloat:</p>

<pre><code>require Math::BigFloat;</code></pre>

<p>This will load the necessary things (like BigInt) when they are needed, and automatically.</p>

<p>See <a href="./Math::BigInt.html">Math::BigInt</a> for more details than you ever wanted to know about using a different low-level library.</p>

<h2 id="Using-Math::BigInt::Lite"><a class="permalink" href="./Math::BigFloat.html#Using-Math::BigInt::Lite">#</a><a id="Using"></a>Using Math::BigInt::Lite</h2>

<p>For backwards compatibility reasons it is still possible to request a different storage class for use with Math::BigFloat:</p>

<pre><code>use Math::BigFloat with =&gt; &#39;Math::BigInt::Lite&#39;;</code></pre>

<p>However, this request is ignored, as the current code now uses the low-level math library for directly storing the number parts.</p>

<h1 id="EXPORTS"><a class="permalink" href="./Math::BigFloat.html#EXPORTS">#</a>EXPORTS</h1>

<p><code>Math::BigFloat</code> exports nothing by default, but can export the <code>bpi()</code> method:</p>

<pre><code>use Math::BigFloat qw/bpi/;

print bpi(10), &quot;\n&quot;;</code></pre>

<h1 id="CAVEATS"><a class="permalink" href="./Math::BigFloat.html#CAVEATS">#</a>CAVEATS</h1>

<p>Do not try to be clever to insert some operations in between switching libraries:</p>

<pre><code>require Math::BigFloat;
my $matter = Math::BigFloat-&gt;bone() + 4;    # load BigInt and Calc
Math::BigFloat-&gt;import( lib =&gt; &#39;Pari&#39; );    # load Pari, too
my $anti_matter = Math::BigFloat-&gt;bone()+4; # now use Pari</code></pre>

<p>This will create objects with numbers stored in two different backend libraries, and <b>VERY BAD THINGS</b> will happen when you use these together:</p>

<pre><code>my $flash_and_bang = $matter + $anti_matter;    # Don&#39;t do this!</code></pre>

<dl>

<dt id="stringify,-bstr()"><a class="permalink" href="./Math::BigFloat.html#stringify,-bstr()">#</a><a id="stringify"></a><a id="stringify-bstr"></a>stringify, bstr()</dt>
<dd>

<p>Both stringify and bstr() now drop the leading &#39;+&#39;. The old code would return &#39;+1.23&#39;, the new returns &#39;1.23&#39;. See the documentation in <a href="./Math::BigInt.html">Math::BigInt</a> for reasoning and details.</p>

</dd>
<dt id="brsft()"><a class="permalink" href="./Math::BigFloat.html#brsft()">#</a><a id="brsft"></a>brsft()</dt>
<dd>

<p>The following will probably not print what you expect:</p>

<pre><code>my $c = Math::BigFloat-&gt;new(&#39;3.14159&#39;);
print $c-&gt;brsft(3,10),&quot;\n&quot;;     # prints 0.00314153.1415</code></pre>

<p>It prints both quotient and remainder, since print calls <code>brsft()</code> in list context. Also, <code>$c-&gt;brsft()</code> will modify $c, so be careful. You probably want to use</p>

<pre><code>print scalar $c-&gt;copy()-&gt;brsft(3,10),&quot;\n&quot;;
# or if you really want to modify $c
print scalar $c-&gt;brsft(3,10),&quot;\n&quot;;</code></pre>

<p>instead.</p>

</dd>
<dt id="Modifying-and-="><a class="permalink" href="./Math::BigFloat.html#Modifying-and-=">#</a><a id="Modifying"></a><a id="Modifying-and"></a>Modifying and =</dt>
<dd>

<p>Beware of:</p>

<pre><code>$x = Math::BigFloat-&gt;new(5);
$y = $x;</code></pre>

<p>It will not do what you think, e.g. making a copy of $x. Instead it just makes a second reference to the <b>same</b> object and stores it in $y. Thus anything that modifies $x will modify $y (except overloaded math operators), and vice versa. See <a href="./Math::BigInt.html">Math::BigInt</a> for details and how to avoid that.</p>

</dd>
<dt id="precision()-vs.-accuracy()"><a class="permalink" href="./Math::BigFloat.html#precision()-vs.-accuracy()">#</a><a id="precision1"></a><a id="precision-vs.-accuracy"></a>precision() vs. accuracy()</dt>
<dd>

<p>A common pitfall is to use <a href="./Math::BigFloat.html#precision%28%29">&quot;precision()&quot;</a> when you want to round a result to a certain number of digits:</p>

<pre><code>use Math::BigFloat;

Math::BigFloat-&gt;precision(4);           # does not do what you
                                        # think it does
my $x = Math::BigFloat-&gt;new(12345);     # rounds $x to &quot;12000&quot;!
print &quot;$x\n&quot;;                           # print &quot;12000&quot;
my $y = Math::BigFloat-&gt;new(3);         # rounds $y to &quot;0&quot;!
print &quot;$y\n&quot;;                           # print &quot;0&quot;
$z = $x / $y;                           # 12000 / 0 =&gt; NaN!
print &quot;$z\n&quot;;
print $z-&gt;precision(),&quot;\n&quot;;             # 4</code></pre>

<p>Replacing <a href="./Math::BigFloat.html#precision%28%29">&quot;precision()&quot;</a> with <a href="./Math::BigFloat.html#accuracy%28%29">&quot;accuracy()&quot;</a> is probably not what you want, either:</p>

<pre><code>use Math::BigFloat;

Math::BigFloat-&gt;accuracy(4);          # enables global rounding:
my $x = Math::BigFloat-&gt;new(123456);  # rounded immediately
                                      #   to &quot;12350&quot;
print &quot;$x\n&quot;;                         # print &quot;123500&quot;
my $y = Math::BigFloat-&gt;new(3);       # rounded to &quot;3
print &quot;$y\n&quot;;                         # print &quot;3&quot;
print $z = $x-&gt;copy()-&gt;bdiv($y),&quot;\n&quot;; # 41170
print $z-&gt;accuracy(),&quot;\n&quot;;            # 4</code></pre>

<p>What you want to use instead is:</p>

<pre><code>use Math::BigFloat;

my $x = Math::BigFloat-&gt;new(123456);    # no rounding
print &quot;$x\n&quot;;                           # print &quot;123456&quot;
my $y = Math::BigFloat-&gt;new(3);         # no rounding
print &quot;$y\n&quot;;                           # print &quot;3&quot;
print $z = $x-&gt;copy()-&gt;bdiv($y,4),&quot;\n&quot;; # 41150
print $z-&gt;accuracy(),&quot;\n&quot;;              # undef</code></pre>

<p>In addition to computing what you expected, the last example also does <b>not</b> &quot;taint&quot; the result with an accuracy or precision setting, which would influence any further operation.</p>

</dd>
</dl>

<h1 id="BUGS"><a class="permalink" href="./Math::BigFloat.html#BUGS">#</a>BUGS</h1>

<p>Please report any bugs or feature requests to <code>bug-math-bigint at rt.cpan.org</code>, or through the web interface at <a href="https://rt.cpan.org/Ticket/Create.html?Queue=Math-BigInt">https://rt.cpan.org/Ticket/Create.html?Queue=Math-BigInt</a> (requires login). We will be notified, and then you&#39;ll automatically be notified of progress on your bug as I make changes.</p>

<h1 id="SUPPORT"><a class="permalink" href="./Math::BigFloat.html#SUPPORT">#</a>SUPPORT</h1>

<p>You can find documentation for this module with the perldoc command.</p>

<pre><code class="plaintext">perldoc Math::BigFloat</code></pre>

<p>You can also look for information at:</p>

<ul>

<li><p>RT: CPAN&#39;s request tracker</p>

<p><a href="https://rt.cpan.org/Public/Dist/Display.html?Name=Math-BigInt">https://rt.cpan.org/Public/Dist/Display.html?Name=Math-BigInt</a></p>

</li>
<li><p>AnnoCPAN: Annotated CPAN documentation</p>

<p><a href="http://annocpan.org/dist/Math-BigInt">http://annocpan.org/dist/Math-BigInt</a></p>

</li>
<li><p>CPAN Ratings</p>

<p><a href="https://cpanratings.perl.org/dist/Math-BigInt">https://cpanratings.perl.org/dist/Math-BigInt</a></p>

</li>
<li><p>MetaCPAN</p>

<p><a href="https://metacpan.org/release/Math-BigInt">https://metacpan.org/release/Math-BigInt</a></p>

</li>
<li><p>CPAN Testers Matrix</p>

<p><a href="http://matrix.cpantesters.org/?dist=Math-BigInt">http://matrix.cpantesters.org/?dist=Math-BigInt</a></p>

</li>
<li><p>The Bignum mailing list</p>

<ul>

<li><p>Post to mailing list</p>

<p><code>bignum at lists.scsys.co.uk</code></p>

</li>
<li><p>View mailing list</p>

<p><a href="http://lists.scsys.co.uk/pipermail/bignum/">http://lists.scsys.co.uk/pipermail/bignum/</a></p>

</li>
<li><p>Subscribe/Unsubscribe</p>

<p><a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/bignum">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/bignum</a></p>

</li>
</ul>

</li>
</ul>

<h1 id="LICENSE"><a class="permalink" href="./Math::BigFloat.html#LICENSE">#</a>LICENSE</h1>

<p>This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.</p>

<h1 id="SEE-ALSO"><a class="permalink" href="./Math::BigFloat.html#SEE-ALSO">#</a><a id="SEE"></a>SEE ALSO</h1>

<p><a href="./Math::BigFloat.html">Math::BigFloat</a> and <a href="./Math::BigInt.html">Math::BigInt</a> as well as the backends <a href="./Math::BigInt::FastCalc.html">Math::BigInt::FastCalc</a>, <a href="./Math::BigInt::GMP.html">Math::BigInt::GMP</a>, and <a href="./Math::BigInt::Pari.html">Math::BigInt::Pari</a>.</p>

<p>The pragmas <a href="bignum.html">bignum</a>, <a href="bigint.html">bigint</a> and <a href="bigrat.html">bigrat</a> also might be of interest because they solve the autoupgrading/downgrading issue, at least partly.</p>

<h1 id="AUTHORS"><a class="permalink" href="./Math::BigFloat.html#AUTHORS">#</a>AUTHORS</h1>

<ul>

<li><p>Mark Biggar, overloaded interface by Ilya Zakharevich, 1996-2001.</p>

</li>
<li><p>Completely rewritten by Tels <a href="http://bloodgate.com">http://bloodgate.com</a> in 2001-2008.</p>

</li>
<li><p>Florian Ragwitz &lt;flora@cpan.org&gt;, 2010.</p>

</li>
<li><p>Peter John Acklam &lt;pjacklam@online.no&gt;, 2011-.</p>

</li>
</ul>


      </div>
      <div id="footer">
        <p>Perldoc Browser is maintained by Dan Book (<a href="https://metacpan.org/author/DBOOK">DBOOK</a>). Please contact him via the <a href="https://github.com/Grinnz/perldoc-browser/issues">GitHub issue tracker</a> or <a href="mailto:dbook@cpan.org">email</a> regarding any issues with the site itself, search, or rendering of documentation.</p>

<p>The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via the <a href="https://github.com/Perl/perl5/issues">Perl issue tracker</a>, the <a href="https://lists.perl.org/list/perl5-porters.html">mailing list</a>, or <a href="https://kiwiirc.com/client/irc.perl.org/p5p">IRC</a> to report any issues with the contents or format of the documentation.</p>


      </div>
    </div>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.slim.min.js" integrity="sha512-/DXTXr6nQodMUiq+IUJYCt2PPOUjrHJ9wFrqpJ3XkgPNOZVfMok7cRw6CSxyCQxXn6ozlESsSh1/sMCTF1rL/g==" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js" integrity="sha512-ubuT8Z88WxezgSqf3RLuNi5lmjstiJcyezx34yIU2gAHonIi27Na7atqzUZCOoY4CExaoFumzOsFQ2Ch+I/HCw==" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
    <script src="../highlight.pack.js"></script>
    <script>hljs.highlightAll();</script>
  </body>
</html>
